<template>
	<view class="container">
		<scroll-view class="scroll-view_H" scroll-y="true" style="height: calc(100vh - 20rpx);">
			<view class="items">
				<view class="item">
					<text class="left">项目</text>
					<text class="right">{{info.feeName}}</text>
				</view>
				<view class="item">
					<text class="left">单价</text>
					<text class="right">{{info.price}}</text>
				</view>
				<view class="item">
					<text class="left">数量</text>
					<text class="right">{{info.count}}</text>
				</view>
				<view class="item">
					<text class="left">单位</text>
					<text class="right">{{info.unit}}</text>
				</view>
				<view class="item">
					<text class="left">支付金额</text>
					<text class="right">{{info.amount}}</text>
				</view>
				<view class="item">
					<text class="left">支付时间</text>
					<text class="right">{{formateTime(info.payTime)}}</text>
				</view>
				<view class="item">
					<text class="left">开单科室</text>
					<text class="right">{{info.departName}}</text>
				</view>
				<view class="item">
					<text class="left">开单医师</text>
					<text class="right">{{info.doctorName}}</text>
				</view>
				<view class="item">
					<text class="left">开单时间</text>
					<text class="right">{{formateTime(info.createTime)}}</text>
				</view>
				<view class="item" style="border: none;">
					<text class="left">执行科室</text>
					<text class="right">{{info.executeDept}}</text>
				</view>
			</view>

		</scroll-view>
	</view>
</template>
<script>
	import {
		checkOutpatientPayment
	} from "@/api/pay/index.js"
	export default {
		components: {},
		data() {
			return {
				info: {}
			}
		},
		onLoad(options) {
			this.info = JSON.parse(options.info)
		},
		methods: {
			formateTime(res) {
				if (res.length > 19) {
                   return res.substring(0,19)
				}else{
					return res
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: rgb(245, 245, 245);
	}


	.items {
		padding: 24rpx;
		background-color: #fff;
		border-radius: 8px;
		margin: 20rpx;


		.item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx 0;
			border-bottom: 1px solid #eee;

			.left {
				flex: 1;
				font-size: 26rpx;
				color: #323232;
			}

			.right {
				font-size: 26rpx;
				color: #666;
			}

		}

	}
</style>